namespace GomuLibrary.IO.DiscImage.Type
{
    using GomuLibrary.IO.DiscImage;
    using System;
    using System.IO;

    public class NrgType : IDiscImage
    {
        private string _imagePath;
        private SectorStructure _sector;

        public NrgType(string imagePath)
        {
            this._imagePath = imagePath;
            this._sector = new SectorStructure();
        }

        public long FirstDumpSector() => 
            0x4b000L;

        public SectorStructure GetSectorStucture()
        {
            this._sector = new SectorStructure();
            try
            {
                try
                {
                    if (new FileInfo(this._imagePath).Length > 0x57800L)
                    {
                        this._sector = new SectorStructure(0x800, 0);
                    }
                }
                catch (Exception)
                {
                }
            }
            finally
            {
            }
            return this._sector;
        }

        public string ImagePath =>
            this._imagePath;
    }
}

